<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./JS/vue.js"></script>
</head>
<body>
    <div id="app">
    <cpn></cpn>
    <cpn2></cpn2>
    </div>
    <!-- 第一个方法 -->
    <script type="text/x-template" id="cpn">
        <div>
            <h2>标题</h2>
        </div>
    </script>
    <template id="cpn2">
        <div>
            <h2>标题2</h2>
        </div>
    </template>
    <script>
        Vue.component('cpn',{
            template:'#cpn'
        })
        Vue.component('cpn2',{
            template:'#cpn2'
        })
        const app = new Vue({
            el: '#app',
            data:{

            },
            methods:{
                
            },
            components:{

            }
        })
    </script>
</body>
</html>